<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript">
		var a=prompt("请输入工资:");
		if(isNaN(a)==true)
		{
			alert("不是数字，请重新输入");
		}else{
			function aa(a){
			var result=0;
			if(a<=3500)
			{
				result=0;
			}else if(3500<a<=8000)
			{
				result=(a-3500)*0.02;
			}else if(8000<a<=20000)
			{
				result=(a-8000)*0.05+(8000-3500)*0.02;
			}else (a>20000)
			{
				result=(a-20000)*0.10+(20000-8000)*0.05+(8000-3500)*0.02;
			}
			alert("应该交个人所得税"+result)
			}
			}
		</script>
	</head>
	<body>
		<input type="button" value="个税" onclick="aa(a);" />
	</body>
</html>
